import { request } from '@/utils/request';

export async function query(): Promise<any> {
  return request('/api/users');
}

export async function queryCurrent(): Promise<any> {
  return request('/api/currentUser');
}

export async function queryNotices(): Promise<any> {
  return request('/api/notices');
}
export async function getSysRoutesList(data: any): Promise<any> {
  return request('/api/freshSystem/all/getSysRoutesListByRoleId/'+data);
}

export function revisePass(data: any): Promise<any> {
  console.log(data)
  return request('/api/user/revise/',{
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
      Accept: 'application/json',
      Authorization: localStorage.getItem("token")
    },
    body: JSON.stringify(data),
    method: 'POST'
  });
}
